<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.zejson.entity.Role" %>
<%@ page import="java.lang.String" %>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page isELIgnored="false" %>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%--

<!-- JSP视图解析器 -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
	<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
	<property name="prefix" value="/"></property>
	<property name="suffix" value=".jsp"></property>
</bean>

--%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>录入信息</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<!-- Styles -->
<link
	href="${pageContext.request.contextPath}/templates/assets/plugins/bootstrap/css/bootstrap.min.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/templates/assets/plugins/font-awesome/css/font-awesome.min.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/templates/assets/plugins/icomoon/style.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/templates/assets/plugins/uniform/css/default.css"
	rel="stylesheet" />
<link
	href="${pageContext.request.contextPath}/templates/assets/plugins/switchery/switchery.min.css"
	rel="stylesheet" />

<!-- Theme Styles -->
<link
	href="${pageContext.request.contextPath}/templates/assets/css/ecaps.min.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath}/templates/assets/css/custom.css"
	rel="stylesheet">
</head>
<body>
	<!-- Page Container -->
	<div class="page-container">
		<!-- Page Inner -->
		<div class="page-inner login-page">
			<div id="main-wrapper" class="container-fluid">
				<div class="row">
					<div class="col-sm-6 col-md-3 login-box">
						<h4 class="login-title">Create an account</h4>
						<form action="${pageContext.request.contextPath}/register/register.do" method="post">
							<div class="form-group">
								<label for="exampleInputFirstName">username</label>
								<input
									type="text" class="form-control" id="exampleInputFirstName" name="username" required>
							</div>
							<div class="form-group">
								<label>sex</label>
								<select name="sex">
									<option value="0">男</option>
									<option value="1">女</option>
								</select>
							</div>
							<div class="form-group">
								<label>role</label>
								<select name="FkRoleid">
									<%
										List roles = (List) request.getAttribute("roles");
									%>
									<% for (int i = 0; i < roles.size(); i++) {
										Role role = (Role) roles.get(i);
									%>
										<option value="<%=role.getRoleid()%>"><%=role.getRolepurview()%></option>
									<%
									}
									%>
								</select>
								<p></p>
							</div>
							<div class="form-group">
								<label for="exampleInputEmail">Email address</label>
								<input
									type="email" class="form-control" id="exampleInputEmail" name="e-mail" required>
							</div>
							<div class="form-group">
								<label>phone</label>
								<input
										type="text"name="phone">
							</div>
							<div class="form-group">
								<label>Password</label>
								<input
									type="password"name="password1" required>
							</div>
							<div class="form-group">
								<label>Password</label>
								<input
										type="password"name="password2" required>
							</div>
							<button type="submit" class="btn btn-primary">Register</button>
							<a href="${pageContext.request.contextPath}/login" class="btn btn-default">Login</a><br> <a
								href="${pageContext.request.contextPath}/index" class="forgot-link">Forgot password?</a>
						</form>
					</div>
				</div>
			</div>
		</div>
		<!-- /Page Content -->
	</div>
	<!-- /Page Container -->

	<!-- Javascripts -->
	<script type="text/javascript" src="${pageContext.request.contextPath}/templates/assets/plugins/jquery/jquery-3.1.0.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/templates/assets/plugins/bootstrap/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/templates/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/templates/assets/plugins/uniform/js/jquery.uniform.standalone.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/templates/assets/plugins/switchery/switchery.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/templates/assets/js/ecaps.min.js"></script>
</body>
</html>
